package com.nfc.lock.common.constant;

/**
 * 系统常量
 */
public class Constants {

    /**
     * 角色类型
     */
    public static class RoleType {
        public static final int SUPER_ADMIN = 1;  // 超级管理员
        public static final int PROVINCE = 2;      // 省管理员
        public static final int CITY = 3;          // 市管理员
        public static final int COUNTY = 4;        // 县管理员
        public static final int CENTER = 5;        // 城区供电中心管理员
        public static final int STATION = 6;       // 供电所管理员
        public static final int USER = 7;          // 使用人
    }

    /**
     * 操作类型
     */
    public static class OperationType {
        public static final int ADD = 1;      // 新增锁
        public static final int OPEN = 2;     // 开锁
        public static final int CLOSE = 3;    // 关锁
    }

    /**
     * 锁具状态
     */
    public static class LockStatus {
        public static final int CLOSED = 0;   // 关闭
        public static final int OPEN = 1;     // 开启
    }

    /**
     * 预警类型
     */
    public static class WarningType {
        public static final int LONG_UNLOCK = 1;  // 长期未关锁
        public static final int DAMAGED = 2;      // 锁具损坏
    }

    /**
     * 预警时长（分钟）
     */
    public static final int UNLOCK_WARNING_MINUTES = 120;

    /**
     * Redis Key前缀
     */
    public static class RedisKey {
        public static final String USER_INFO = "user:info:";
        public static final String TOKEN = "token:";
    }
}
